package com.song.javathread_day01.ch1_9;

import java.lang.Thread.UncaughtExceptionHandler;

public class ExceptionHandler implements UncaughtExceptionHandler {

	public void uncaughtException(Thread t, Throwable e) {
		
		System.out.printf("An exception has been captured\n");
		System.out.printf("Thread  :%s\n",t.getId());
		System.out.printf("Thread  :%s\n",t.getId());
		System.out.printf("Exception : %s ： %s \n",e.getClass().getName(),e.getMessage());
		System.out.printf("Stack trace :\n");
		e.printStackTrace(System.out);
		System.out.printf("Thread status : %s\n",t.getState());
	}

}
